Typical distributed systems include clients and servers. The servers are configured to interact with the clients and to provide service to the clients. One common service that the servers provide is file storage. Thus, clients can store a copy of their files on the server and in addition other clients can access the files stored on the server. If the files contain critical data, then it becomes advantageous to employ a data backup scheme to ensure that critical data is not lost if the server containing the data fails. One data backup scheme that is commonly employed is mirroring. Mirroring (also known as RAID 1) involves maintaining two (or more) copies of a file, where each copy of the file is located on separate file storage device (e.g., a local hard disk, a networked hard disk, a network file servers, etc.).
When one or more servers holding one or more mirror fails for any length of time, that mirror(s) may become unsynchronized. However, when employing a mirroring scheme, it is of critical importance to ensure that the mirrors are synchronized (i.e., that the content of each mirror is the same). If a mirror becomes unsynchronized, the simplest recovering scheme involves copying all of the data from a synchronized mirror to the unsynchronized mirror. A more efficient mirror recovery scheme is dirty region logging (DRL). In the conventional DRL schemes, each mirror is logically divided into a number of “regions.” Depending on the implementation, the region may be as small as single disk sector or larger than 256 KB.
Whenever the content of a region changes, for example, when there is a write operation on data within the region, a dirty region log entry for the region is created in the dirty region log. In most cases, the dirty region log entry merely indicates that data in the region has changed. During normal execution, every time a region on a given mirror is modified, the corresponding region on the other mirror is also modified such that the mirrors remain synchronized. Thus, a dirty region log entry is created when the region is modified on the first mirror and then subsequently cleared once corresponding region on the other mirrors has been synchronized. If one or more mirrors fail prior to synchronization, then the dirty region log is used to determine which regions on the mirrors are not synchronized.